home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / xcmd / xcmdmscl.sit / XCMD Miscellany / card_3307.txt < prev    next >
Text File  |  1989-02-11  |  6KB  |  220 lines

  1. -- card: 3307 from stack: in
  2. -- bmap block id: 3767
  3. -- flags: 0000
  4. -- background id: 2589
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openStack
  8.   set the scroll of card field "Desc Popup" to 0
  9.   set the scroll of card field "Desc Cursor" to 0
  10.   PopupField "card field" && quote & "Click to continueΓǪ" & quote
  11. end openStack
  12.  
  13. -- just to confuseΓǪ
  14. on arrowKey arb
  15.   visual effect iris open slow
  16.   if random(2) = 1
  17.   then
  18.   go card "Popup Demo"
  19. else
  20.   go card "Cursor Demo"
  21. end if
  22. end arrowKey
  23.  
  24.  
  25. -- part 1 (field)
  26. -- low flags: 01
  27. -- high flags: 0000
  28. -- rect: left=147 top=25 right=52 bottom=362
  29. -- title width / last selected line: 0
  30. -- icon id / first selected line: 0 / 0
  31. -- text alignment: 1
  32. -- font id: 3
  33. -- text size: 18
  34. -- style flags: 768
  35. -- line height: 24
  36. -- part name: 
  37.  
  38.  
  39. -- part 2 (field)
  40. -- low flags: 01
  41. -- high flags: 0000
  42. -- rect: left=3 top=64 right=87 bottom=103
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 0 / 0
  45. -- text alignment: 0
  46. -- font id: 3
  47. -- text size: 14
  48. -- style flags: 256
  49. -- line height: 18
  50. -- part name: 
  51.  
  52.  
  53. -- part 3 (field)
  54. -- low flags: 01
  55. -- high flags: 0000
  56. -- rect: left=261 top=64 right=87 bottom=360
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 0 / 0
  59. -- text alignment: 0
  60. -- font id: 3
  61. -- text size: 14
  62. -- style flags: 256
  63. -- line height: 18
  64. -- part name: 
  65.  
  66.  
  67. -- part 6 (button)
  68. -- low flags: 00
  69. -- high flags: 0000
  70. -- rect: left=3 top=23 right=46 bottom=30
  71. -- title width / last selected line: 0
  72. -- icon id / first selected line: 21700 / 21700
  73. -- text alignment: 1
  74. -- font id: 0
  75. -- text size: 12
  76. -- style flags: 0
  77. -- line height: 16
  78. -- part name: New Button
  79. ----- HyperTalk script -----
  80. on mouseUp
  81.   go home
  82. end mouseUp
  83.  
  84.  
  85.  
  86. -- part 9 (field)
  87. -- low flags: 01
  88. -- high flags: 0007
  89. -- rect: left=261 top=90 right=301 bottom=509
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 0 / 0
  92. -- text alignment: 0
  93. -- font id: 3
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: Desc Cursor
  98.  
  99.  
  100. -- part 7 (field)
  101. -- low flags: 01
  102. -- high flags: 0007
  103. -- rect: left=3 top=90 right=301 bottom=250
  104. -- title width / last selected line: 0
  105. -- icon id / first selected line: 0 / 0
  106. -- text alignment: 0
  107. -- font id: 3
  108. -- text size: 12
  109. -- style flags: 0
  110. -- line height: 16
  111. -- part name: Desc Popup
  112.  
  113.  
  114. -- part 10 (button)
  115. -- low flags: 00
  116. -- high flags: 8003
  117. -- rect: left=68 top=310 right=332 bottom=168
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 0
  122. -- text size: 12
  123. -- style flags: 0
  124. -- line height: 16
  125. -- part name: Demo╔
  126. ----- HyperTalk script -----
  127. on mouseUp
  128.   visual effect iris open slow
  129.   go card "Popup Demo"
  130. end mouseUp
  131.  
  132.  
  133.  
  134. -- part 11 (button)
  135. -- low flags: 00
  136. -- high flags: 8003
  137. -- rect: left=335 top=310 right=332 bottom=435
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 1
  141. -- font id: 0
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: Demo╔
  146. ----- HyperTalk script -----
  147. on mouseUp
  148.   visual effect iris open slow
  149.   go card "Cursor Demo"
  150. end mouseUp
  151.  
  152.  
  153.  
  154. -- part 12 (field)
  155. -- low flags: 80
  156. -- high flags: 0000
  157. -- rect: left=21 top=85 right=297 bottom=490
  158. -- title width / last selected line: 0
  159. -- icon id / first selected line: 0 / 0
  160. -- text alignment: 1
  161. -- font id: 0
  162. -- text size: 12
  163. -- style flags: 0
  164. -- line height: 16
  165. -- part name: Click to continue╔
  166.  
  167.  
  168. -- part 13 (button)
  169. -- low flags: 00
  170. -- high flags: 0001
  171. -- rect: left=33 top=23 right=48 bottom=61
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 25002 / 25002
  174. -- text alignment: 1
  175. -- font id: 0
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: New Button
  180. ----- HyperTalk script -----
  181. on mouseUp
  182.   PopupField "card field" && quote & "Click to continueΓǪ" & quote
  183. end mouseUp
  184.  
  185.  
  186.  
  187. -- part contents for card part 1
  188. ----- text -----
  189. XCMD Miscellany
  190.  
  191. -- part contents for card part 2
  192. ----- text -----
  193. PopupField
  194.  
  195. -- part contents for card part 3
  196. ----- text -----
  197. SetCursor
  198.  
  199. -- part contents for card part 7
  200. ----- text -----
  201. PopupField displays a window in front of everything else containing the contents of a specified field, this window has the same TEXT area as the field and is displayed in the same screen position. It then waits until the mouse is clicked and which point it removes the window. The argument to PopupField is a STRING containing a chunk expression which identifies the field. The window style used is: rectangle/shadow for rectangle/shadow fields; standard document for scrolling fields; round cornered for transparent fields and alert box for opaque fields. For scrolling and transparent fields the field name is displayed as the window title.
  202.  
  203. -- part contents for card part 9
  204. ----- text -----
  205. WARNING: (a) this XCMD allows you to violate the Apple User Interface Guidelines! (b) this XCMD manipulates (officiallyΓǪ) undocumented globals and has only been tested on a Mac+, it should work on an SE but I don't know about II, IIx or SE/30's. USE AT YOUR OWN RISK.
  206. SetCursor allows you to set the screen cursor to any location and also to (de)couple the cursor from mouse movementsΓǪ Any argument errors detected by SetCursor are returned in the External_Error global.
  207. To move the cursor use "SetCursor <h-coord>,<v-coord>". To decouple the cursor from the mouse use "SetCursor free", BE CAREFUL with this as there is no way to recouple it using the keyboard/menus! A decoupled cursor can still be moved using SetCursor. To couple the mouse and the cursor again use either "SetCursor reset", which puts the cursor back to where to was when decoupled, or "SetCursor mouse", which leaves the cursor where it is.
  208.  
  209. -- part contents for card part 12
  210. ----- text -----
  211. The XMCD's in this stack are ┬⌐ 1989 by Nigel Perry, portions of the code are ┬⌐ Symantec Inc. You may use these XCMD's freely in your stacks, provided that you do not sell, or in any other way profit from, those stacks (this includes ShareWare). Comments, suggestions, complaints, praise, requests for custom XCMD's (┬ú┬ú┬úΓǪ) etc. to:
  212. Nigel Perry
  213. Dept of Computer Science
  214. Imperial College
  215. London SW7
  216. England
  217. Email: np@uk.ac.ic.doc
  218.  
  219. Enjoy!
  220.